package com.hairline.controller;


import com.hairline.bean.Region;
import com.hairline.bean.vo.BaseRespVo;
import com.hairline.service.WxRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/wx/region")
public class WxRegionController {
    @Autowired
    WxRegionService wxRegionService;


    @RequestMapping("list")
    public BaseRespVo list(Integer pid){
        List<Region> regionList = wxRegionService.selectListByPid(pid);
        return BaseRespVo.ok(regionList);
    }
}
